import request from '@/utils/request'
/**
 * 仓库管理
 * @see {@link http://ps.jibachuan.com/platform/swagger-ui.html#!/store-controller}
 */
const categoryMod = '/category'
const storeMod = '/store'

/**
 * [getRoot 查询根栏目]
 */
export function getRoot(data) {
    return request({
        url: `${categoryMod}/getRoot`,
        method: 'post',
        data
    })
}

/**
 * [getSub 查询指定类别下小类别]
 */
export function getSub(data) {
    return request({
        url: `${categoryMod}/getSub`,
        method: 'post',
        data
    })
}

/**
 * [getById 获取采购详情]
 */
export function getStoreById(data) {
    return request({
        url: `${storeMod}/getById`,
        method: 'post',
        data
    })
}